 
 function runAnimSmallToBig(node,time,time2){
    node.scale=0;
    var action= cc.sequence(cc.scaleTo(time, 1.2, 1.2), cc.scaleTo(time2, 1, 1));
    node.runAction(action);
    return action;
 }

 function runAnimSmallToBigForever(node){
    var action= cc.sequence(cc.scaleTo(0.5, 1.1, 1.1), cc.scaleTo(0.5, 1, 1));
    node.runAction(cc.repeatForever(action));
    return action;
 }

 function runAnimBottomToMid(node,cb=null){
     node.setPosition(cc.v2(0,-900));
    var action;
    if(!cb){
       action= cc.sequence(cc.moveTo(0.5, 0, 0),cc.delayTime(2),cc.moveTo(0.5,0,900));
    }
    else{
      action= cc.sequence(cc.moveTo(0.5, 0, 0),cc.delayTime(2),cc.moveTo(0.5,0,900),cc.callFunc(()=>{
         cb();
      }));
    }
    node.runAction(action);
    return action;
 }


    
    
 export default{
        runAnimSmallToBig,
        runAnimSmallToBigForever,
        runAnimBottomToMid
 }